package com.example.lxy.iot4;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.LinearLayout;

import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;


import com.example.lxy.iot4.R;
import com.example.lxy.iot4.SupportLineUtils;


public class ChartActivity extends AppCompatActivity {
    private SupportLineUtils mLineUtils;
    private LinearLayout mLinearLayoutLine;
    private double[] SourceDat=new double[]{5,7,6,3,1,5,3,6,3,};
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_chart);

        mLinearLayoutLine = (LinearLayout) findViewById(R.id.linearLayout_line);
        try {
            mLineUtils = new SupportLineUtils(this.getApplicationContext());
            mLinearLayoutLine.addView(mLineUtils.initLineGraphView(SourceDat));
        }catch(Exception e){
            e.printStackTrace();
        }

    }
}
